//
//  AXHomeZjzdResultVC.m
//  AnXin100
//
//  Created by 天质弘耕 on 2018/11/6.
//  Copyright © 2018 tzhg. All rights reserved.
//

#import "AXHomeZjzdResultVC.h"
#import "UIViewController+HBD.h"

@interface AXHomeZjzdResultVC ()

@end

@implementation AXHomeZjzdResultVC

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupNavigationItems];
    self.hbd_barTintColor = [UIColor whiteColor];
    self.hbd_barShadowHidden = YES;
    self.view.backgroundColor = [UIColor whiteColor];
    [self creatView];
    
}

- (void)setupNavigationItems {
    
    /** 导航条左边的按钮 */
    //返回按钮
    UIButton *kfBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [kfBtn setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
    kfBtn.frame = CGRectMake(0, 0, 30, 30);
    [kfBtn addTarget:self action:@selector(backAction:) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem *leftItem = [[UIBarButtonItem alloc]initWithCustomView:kfBtn];
    self.navigationItem.leftBarButtonItem = leftItem;
    
    /** title */
    UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 100, 30)];
    titleLabel.text = @"诊断结果";
    titleLabel.textAlignment = NSTextAlignmentCenter;
    titleLabel.font = FONT_FOURTEEN;
    titleLabel.textColor = [UIColor colorWithHex:0x29b566];
    self.navigationItem.titleView = titleLabel;
    
    
    
}


- (void)creatView {
    
    UILabel *label = [[UILabel alloc]init];
    label.text = @"专家美羊羊的诊断结果";
    label.font = FONT_FOURTEEN;
    label.textColor = COLOR_DIV;
    [self.view addSubview:label];
    
    UIView *lineView = [[UIView alloc]init];
    lineView.cornerRadius = 5;
    lineView.borderWidth = 1;
    lineView.backgroundColor = [UIColor whiteColor];
    lineView.borderColor = COLOR_DIV;
    [self.view addSubview:lineView];
    
    UILabel *contentLabel = [[UILabel alloc]init];
    contentLabel.numberOfLines = 10;
    contentLabel.font = FONT_FOURTEEN;
    contentLabel.textColor = COLOR_DIV;
    contentLabel.text = @"根据您提供的图片和病症描述，诊断您种植的葡萄为灰色霉病和 白粉病感染。";
    [lineView addSubview:contentLabel];
    
    
    label.sd_layout
    .leftSpaceToView(self.view, 10)
    .topSpaceToView(self.view, 50+NAVIGATION_HEIGHT)
    .widthIs(SCREEN_WIDTH-20)
    .heightIs(30);
    
    lineView.sd_layout
    .leftSpaceToView(self.view, 10)
    .topSpaceToView(label, 10)
    .rightSpaceToView(self.view, 10)
    .heightIs(200);
    
    contentLabel.sd_layout
    .leftSpaceToView(lineView, 10)
    .topSpaceToView(lineView, 10)
    .rightSpaceToView(lineView, 10)
    .autoHeightRatio(0)
    .minHeightIs(60)
    ;
    
    
    
}



#pragma mark - Action

- (void)backAction:(UIBarButtonItem *)item {
    [self.navigationController popViewControllerAnimated:YES];
}

@end
